package com.game.sdk.chain;

import com.coment.dto.ApiNotify;
import com.game.sdk.handle.CreateChain;
import jakarta.annotation.Resource;
import com.sdk.apiNotify.rabbitmq.consumber.server.ApiNotifyPushService;
import org.springframework.stereotype.Service;

@Service
public class ApiNotifyPushServiceImpl implements ApiNotifyPushService {

   @Resource
   private CreateChain createChain;

   public void handlerMessage(ApiNotify body) {
      if (body.getRoomId().contains("test")) {
         String replace = body.getRoomId().replace("test", "");
         body.setRoomId(replace);
      }
      createChain.tryCreateChain(body);
   }
}
